<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/

Route::get('/', function (){
    return view('welcome');                                 
});

//后台首页
Route::get('/home page', function (){
    return view('admin.index');
});

Route::get('admin/login','admin\loginController@index');
Route::post('admin/login','admin\loginController@dologin');
Route::get('admin/index','admin\IndexController@index');

//验证码
Route::get('admin/captch/{tmp}','admin\loginController@captch');
//添加用户
Route::resource('admin/user','admin\userController');

//轮播管理
Route::resource('admin/carousel','admin\carouselController');
//列表显示
Route::get('admin/carousel','admin\carouselController@getList');


//商品管理
Route::resource('admin/type','admin\TypeController');

//分类添加	
Route::get('/admin/typeSon/{id}','admin\TypeController@createSon');
Route::post('/typeSon','admin\TypeController@storeSon');

//网站设置
Route::get('admin/name','admin\WebsiteController@index');
Route::post('/Website','admin\WebsiteController@doUpload');

//订单详情
Route::resource('admin/order','admin\TheController@index');
Route::get('/admin/orderView/{id}','admin\TheController@orderindex');